package com.atmosphere.interfaces.component;

import com.jme.renderer.ColorRGBA;
import com.jme.scene.state.FogState;
import com.jme.scene.state.FogState.DensityFunction;

/**
 * <code>IFogComponent</code> defines the interface of a component
 * unit that is responsible for providing per-vertex fog effect
 * for the atmosphere system.
 * <p>
 * <code>IFogComponent</code> provides the similar kind of dynamic
 * color effect as the <code>ILightingComponent</code>. It allows
 * three color values for day, night and transition time intervals.
 * It provides the proper logic for updating the color based on
 * time value.
 * <p>
 * <code>IFogComponent</code> internally maintains its own instance
 * of <code>FogState</code>. However, a pre-defined instance can be
 * used if it is passed in at construction time.
 *
 * @author Yi Wang (Neakor)
 * @version Creation date: 05-21-2009 17:04 EST
 * @version Modified date: 06-24-2009 23:24 PST
 */
public interface IFogComponent extends IClocktimeComponent {

	/**
	 * Set the ending distance.
	 * @param distance The <code>Float</code> distance.
	 */
	public void setEnd(float distance);
	
	/**
	 * Set the starting distance.
	 * @param distance The <code>Float</code> distance.
	 */
	public void setStart(float distance);
	
	/**
	 * Set the density of the fog.
	 * @param density The <code>Float</code> density.
	 */
	public void setDensity(float density);
	
	/**
	 * Set the day color.
	 * @param color The <code>ColorRGBA</code> to be set.
	 */
	public void setDayColor(ColorRGBA color);
	
	/**
	 * Set the night color.
	 * @param color The <code>ColorRGBA</code> to be set.
	 */
	public void setNightColor(ColorRGBA color);
	
	/**
	 * Set the transition color between day and night time.
	 * @param color The <code>ColorRGBA</code> to be set.
	 */
	public void setTransitionColor(ColorRGBA color);

	/**
	 * Set the density function.
	 * @param function The <code>DensityFunction</code>.
	 */
	public void setFunction(DensityFunction function);

	/**
	 * Retrieve the fog state.
	 * @return The <code>FogState</code> instance.
	 */
	public FogState getFogState();
	
	/**
	 * Retrieve the ending distance.
	 * @return The <code>Float</code> distance.
	 */
	public float getEnd();
	
	/**
	 * Retrieve the starting distance.
	 * @return The <code>Float</code> distance.
	 */
	public float getStart();
	
	/**
	 * Retrieve the fog density.
	 * @return The <code>Float</code> density value.
	 */
	public float getDensity();
	
	/**
	 * Retrieve the day color.
	 * @return The day <code>ColorRGBA</code>.
	 */
	public ColorRGBA getDayColor();
	
	/**
	 * Retrieve the night color.
	 * @return The night <code>ColorRGBA</code>.
	 */
	public ColorRGBA getNightColor();
	
	/**
	 * Retrieve the transition color.
	 * @return The transition <code>ColorRGBA</code>.
	 */
	public ColorRGBA getTransitionColor();
}
